object frmCompare: TfrmCompare
  Left = 0
  Top = 0
  BorderStyle = bsDialog
  Caption = 'Compare'
  ClientHeight = 648
  ClientWidth = 994
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'Tahoma'
  Font.Style = []
  OldCreateOrder = False
  Position = poScreenCenter
  PixelsPerInch = 96
  TextHeight = 13
  object rzspl1: TRzSplitter
    Left = 0
    Top = 0
    Width = 994
    Height = 648
    Position = 848
    Percent = 85
    Align = alClient
    TabOrder = 0
    BarSize = (
      848
      0
      852
      648)
    UpperLeftControls = (
      grdCompare)
    LowerRightControls = (
      grddt
      rzpnltop
      rzpnl1)
    object grdCompare: TDBGridEh
      Left = 0
      Top = 0
      Width = 848
      Height = 648
      Align = alClient
      DataGrouping.GroupLevels = <>
      DataSource = dsCompare
      Flat = False
      FooterColor = clWindow
      FooterFont.Charset = DEFAULT_CHARSET
      FooterFont.Color = clWindowText
      FooterFont.Height = -11
      FooterFont.Name = 'Tahoma'
      FooterFont.Style = []
      FooterRowCount = 1
      IndicatorOptions = [gioShowRowIndicatorEh]
      ReadOnly = True
      SumList.Active = True
      TabOrder = 0
      TitleFont.Charset = DEFAULT_CHARSET
      TitleFont.Color = clWindowText
      TitleFont.Height = -11
      TitleFont.Name = 'Tahoma'
      TitleFont.Style = []
      OnDrawColumnCell = grdCompareDrawColumnCell
      Columns = <
        item
          EditButtons = <>
          FieldName = 'barcode'
          Footers = <>
          Width = 88
        end
        item
          EditButtons = <>
          FieldName = 'style'
          Footers = <>
          Title.Caption = #27454#24335
          Width = 179
        end
        item
          EditButtons = <>
          FieldName = 'Description'
          Footers = <>
          Title.Caption = #25551#36848
          Width = 357
        end
        item
          EditButtons = <>
          FieldName = 'qty'
          Footer.FieldName = 'qty'
          Footer.ValueType = fvtSum
          Footers = <>
          Title.Caption = #24211#23384#25968#37327
          Width = 70
        end
        item
          EditButtons = <>
          FieldName = 'totalqty'
          Footer.FieldName = 'totalqty'
          Footer.ValueType = fvtSum
          Footers = <>
          Title.Caption = #24635#25968#37327
          Width = 87
        end>
      object RowDetailData: TRowDetailPanelControlEh
      end
    end
    object grddt: TDBGridEh
      Left = 0
      Top = 169
      Width = 142
      Height = 479
      Align = alClient
      DataGrouping.GroupLevels = <>
      DataSource = dsdt
      Flat = False
      FooterColor = clWindow
      FooterFont.Charset = DEFAULT_CHARSET
      FooterFont.Color = clWindowText
      FooterFont.Height = -11
      FooterFont.Name = 'Tahoma'
      FooterFont.Style = []
      FooterRowCount = 1
      IndicatorOptions = [gioShowRowIndicatorEh]
      ReadOnly = True
      SumList.Active = True
      TabOrder = 0
      TitleFont.Charset = DEFAULT_CHARSET
      TitleFont.Color = clWindowText
      TitleFont.Height = -11
      TitleFont.Name = 'Tahoma'
      TitleFont.Style = []
      Columns = <
        item
          EditButtons = <>
          FieldName = 'posid'
          Footers = <>
          Title.Caption = #36135#26550
        end
        item
          EditButtons = <>
          FieldName = 'qty'
          Footer.FieldName = 'qty'
          Footer.ValueType = fvtSum
          Footers = <>
          Title.Caption = #25968#37327
        end
        item
          EditButtons = <>
          FieldName = 'hdid'
          Footers = <>
          Visible = False
        end
        item
          EditButtons = <>
          FieldName = 'goodsid'
          Footers = <>
          Visible = False
        end>
      object RowDetailData: TRowDetailPanelControlEh
      end
    end
    object rzpnltop: TRzPanel
      Left = 0
      Top = 41
      Width = 142
      Height = 128
      Align = alTop
      TabOrder = 1
      object rzrg1: TRzRadioGroup
        Left = 2
        Top = 2
        Width = 138
        Height = 124
        Align = alClient
        Caption = #26174#31034#31867#22411
        ItemIndex = 3
        Items.Strings = (
          #20840#37096#26174#31034
          #19981#26174#31034#25968#37327'0'
          #21482#26174#24046#24322
          #21482#26174#30424#28857#25968#37327
          #21482#26174#30424#28857#24046#24322)
        TabOrder = 0
        OnClick = rzrg1Click
        ExplicitHeight = 120
      end
    end
    object rzpnl1: TRzPanel
      Left = 0
      Top = 0
      Width = 142
      Height = 41
      Align = alTop
      TabOrder = 2
      DesignSize = (
        140
        39)
      object btnexport: TButton
        Left = 8
        Top = 10
        Width = 125
        Height = 25
        Anchors = [akLeft, akTop, akRight]
        Caption = #23548#20986#25253#34920
        TabOrder = 0
        OnClick = btnexportClick
      end
    end
  end
  object myqryCompare: TMyQuery
    Connection = DMMySQL.conMySQL
    SQL.Strings = (
      
        'select barcode,style,`Description` ,sgi.storeCode,sgi.qty,sthdid' +
        ',xxx.goodsid,ifnull(xxx.totalqty,0) totalqty'
      
        'from goodsinfo gi left join storegoodsinfo sgi on gi.id=sgi.good' +
        'sid'
      'left join (select sthd.id sthdid,goodsid,sum(qty) totalqty'
      
        'from stocktakinghd sthd left join stocktakingdt stdt on sthd.id ' +
        '= stdt.hdid'
      'where sthd.id=:id '
      'group by  goodsid) xxx on  gi.id=xxx.goodsid'
      'where sgi.storecode=:storecode '
      'order by barcode')
    ReadOnly = True
    Left = 424
    Top = 96
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'id'
      end
      item
        DataType = ftUnknown
        Name = 'storecode'
      end>
  end
  object dsCompare: TDataSource
    DataSet = myqryCompare
    Left = 512
    Top = 96
  end
  object myqrydt: TMyQuery
    Connection = DMMySQL.conMySQL
    SQL.Strings = (
      'select posid,qty,hdid,goodsid'
      'from stocktakingdt')
    ReadOnly = True
    MasterSource = dsCompare
    MasterFields = 'sthdid;goodsid'
    DetailFields = 'hdid;goodsid'
    Active = True
    Left = 720
    Top = 112
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'sthdid'
      end
      item
        DataType = ftUnknown
        Name = 'goodsid'
      end>
  end
  object dsdt: TDataSource
    DataSet = myqrydt
    Left = 760
    Top = 128
  end
end
